export let initState = {
    data: [],
}

export const reducer = (state, action) => {
    switch (action.type) {
        case "changeData":
            return {
                ...state,
                data: action.arr
            }
        default:
            return state
    }
}

export let actions = {
    changeData:(arr)=>({type:"changeData",arr})
}

export let getData = state=>state.data